<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>VMALL</title>
		<link rel="stylesheet" type="text/css" href="{{__PUBLIC__}}/Home/css/index.css"/>
		<link rel="stylesheet" type="text/css" href="{{__PUBLIC__}}/Home/css/footer.css"/>
		<link rel="shortcut icon" href="{{__PUBLIC__}}/Home/images/favicon.ico">
		<script type="text/javascript" src="{{__PUBLIC__}}/Home/js/jquery-1.8.2.min.js"></script>
		<script type="text/javascript" src="{{__PUBLIC__}}/Home/js/index.js"></script>
	</head>
	<body>
			<?php 
				$getModel = new \Admin\Model\Cate;
				$cate = $getModel->catedata(); 
			 ?>
			<!--顶部-->
		<div class="top">
			<div class="top-1">
				<ul class="top-2-1">
					<li class="t-l-1"><a href="http://www.huawei.com/cn/">华为官网</a></li>
					<span></span>
					<li><a href="index.php?m=Home&c=Content&a=index&gid=6&cid=1">华为荣耀</a></li>
				</ul>
				<ul class="top-2-2">
					{{if value="(isset($_SESSION['username']))"}}
						{{if value="(isset($_SESSION['neckname']))"}}
							<li>欢迎<a href="{{U('User/index')}}" class="t-l-f" style="color:red;">&nbsp;{{$_SESSION['neckname']}}&nbsp;</a>回来&nbsp;&nbsp;<a href="{{U('Login/out')}}" class="t-l-f">退出</a></li>
						{{else}}
							<li>欢迎<a href="{{U('User/index')}}" class="t-l-f" style="color:red;">&nbsp;{{$_SESSION['username']}}&nbsp;</a>回来&nbsp;&nbsp;<a href="{{U('Login/out')}}" class="t-l-f">退出</a></li>
						{{endif}}
					{{else}}
					<li><a href="{{U('Login/index')}}" class="t-l-f">登陆</a>&nbsp;&nbsp;<a href="{{U('Register/index')}}" class="t-l-f">注册</a></li>
					{{endif}}
					<span></span>
					<li><a href="{{U('User/index')}}">我的订单</a></li>
					
				</ul>
			</div>
		</div>
			<!--头部-->
		<div class="head">
			<div class="logo">
				<a href="{{U('Index/index')}}">
					<img src="{{__PUBLIC__}}/Home/images/newLogo.png" alt="" />
				</a>
			</div>
			<div class="searchBar">
				<div class="searchBar-area">
					<form action="{{U('Lists/selection')}}" method="post">
						<input type="text" id="s-in" name="search" value="" width="100" />
						<input type="submit" class="sub-in" value="搜索" />
					</form>
				</div>
				<div class="search-key">
					<b>热门搜索：</b>
					{{list from="$dataAll" name="$vd" row='4'}}
						<a href="{{U('Content/index',array('gid'=>$vd['gid'],'cid'=>$vd['category_cid']))}}"><?php echo mb_substr($vd['gname'],0,5,'UTF-8') ?></a>
					{{endlist}}
				</div>
			</div>
			<div class="head-tool">
				<div class="head-t-l">
					<div class="my-mall">
						<div class="m-x">
							<a href="{{U('Index/index')}}">我的商城</a>
							<i></i>
						</div>
						<div class="m-h">
							<div class="m-login">
								{{if value="(isset($_SESSION['username']))"}}
									{{if value="(isset($_SESSION['neckname']))"}}
										<p><a href="{{U('User/users')}}">{{$_SESSION['neckname']}}</a></p>
									{{else}}
										<p><a href="{{U('User/users')}}">{{$_SESSION['username']}}</a></p>
									{{endif}}
								{{else}}
									<p>你好，请<a href="">登录</a><span></span><a href="">注册</a></p>
								{{endif}}
							</div>
							<div class="m-item">
								<ul>
									<li class="m-ge"><a href="{{U('User/index')}}">我的订单</a></li>
									<li><a href="index.php?m=Home&c=User&a=index&n=2">待支付</a></li>
									<li class="m-ge"><a href="index.php?m=Home&c=User&a=index&n=3">待收货</a></li>
								</ul>
							</div>
							<div class="m-img">
								<a href="{{U('User/users')}}"><img src="{{__PUBLIC__}}/Home/images/20151117095513825.jpg" /></a>
							</div>
						</div>
					</div>
				</div>
				<i></i>
				<div class="head-t-r">
					<span id="header-cart-total">
					<?php if(isset($_SESSION['cart']['total_rows'])): ?>
						{{$_SESSION['cart']['total_rows']}}
					<?php else: ?>
						0
					<?php endif ?>
					</span>
					<div class="my-mall">
						<div class="m-x">
							<a href="{{U('OrderList/index')}}">我的购物车</a>
							<i></i>
						</div>
						<?php if(isset($_SESSION['cart']['total_rows'])): ?>
						<div class="m-h">
							<div class="my-cart">
								<ul>
									{{foreach from="$_SESSION['cart']['goods']" key="$k" value="$vc"}}
										<li>
											<div class="hot-sale">
												<a href=""><img style="width:100px;height:100px;" src="{{__ROOT__}}/{{$vc['img']}}"/></a>
												<p class="p-info-hot"><a href=""><?php echo mb_substr($vc['name'],0,14,'UTF-8') ?></a></p>
												<p class="p-price-hot"><em>￥</em><span>{{$vc['price']}}</span>&nbsp;<em>X</em>&nbsp;<span>{{$vc['num']}}</span></p>
												<a href="javascript:;" class="del" onclick="if(confirm('确定删除吗？')) location.href='{{U('OrderList/del',array('k'=>$k))}}'">X</a>
											</div>
										</li>
									{{endforeach}}
									<li class="heji">共&nbsp;&nbsp;<span class="shu">{{$_SESSION['cart']['total_rows']}}</span>&nbsp;&nbsp;件商品,金额合计&nbsp;&nbsp;<span class="zong">￥{{$_SESSION['cart']['total']}}</span><a href="{{U('OrderList/index')}}" class="go-pay">去结算</a></li>
								</ul>
							</div>
						</div>
						<?php else: ?>
							<div class="m-h-2">
								<i class="kong"><p>您的购物车是空的，赶紧选购吧！</p></i>
							</div>
						<?php endif ?>
					</div>
				</div>
			</div>
			<div class="head-wxcode"></div>
		</div>
			<!--导航-->
		<div class="nav">
			<div class="nav-1">
				<div class="nav-l"><p>全部商品</p></div>
				<div class="nav-r">
					 <ul>
					 	<li class="nav-r-1"><a href="{{U('Index/index')}}">首  页</a></li>
					 	{{foreach from="$cate" value="$v"}}
					 		<li><a href="{{U('Lists/index',array('cid'=>$v['cid']))}}">{{$v['cname']}}</a></li>
					 	{{endforeach}}
					 </ul>
				</div>
			</div>
		</div>
			<!--顶部----------------------------------------------------------->
			<!--左菜单，轮播-->
		<div class="hot-board">
			<div class="board">
				<div class="slider">
					<ul class="slider-one">
					{{foreach from="$cate" value="$v"}}
						<li class="slider-one-1">
							<a href="{{U('Lists/index',array('cid'=>$v['cid']))}}" class="s-dt">{{$v['cname']}}</a>
							{{list from="$v['son']" name="$vv" row="3"}}
							<a href="{{U('Lists/index',array('cid'=>$vv['cid']))}}">{{$vv['cname']}}</a>
							{{endlist}}
							<div class="slider-two">
								<ul class="slider-two-2">
								{{foreach from="$v['son']" value="$vt"}}
									<li><a href="{{U('Lists/index',array('cid'=>$vt['cid']))}}">{{$vt['cname']}}</a></li>
								{{endforeach}}
								</ul>
								<dl>
									<dt><span>推荐商品</span></dt>
									{{foreach from="$dataAll" value="$v"}}
										<dd><a href="{{U('Content/index',array('gid'=>$v['gid'],'cid'=>$v['category_cid']))}}" class="p-name"><?php echo mb_substr($v['gname'],0,6,'UTF-8') ?></a></dd>
									{{endforeach}}
								</dl>
							</div>
						</li>
						{{endforeach}}
					</ul>
				</div>
				<div id="hot-l">
					<div class="uu">
						<a href="index.php?m=Home&c=Content&a=index&gid=10&cid=1"><img class="im" src="{{__PUBLIC__}}/Home/images/hw (1).jpg" style="display:block;" alt=""></a>
						<a href="index.php?m=Home&c=Content&a=index&gid=11&cid=3"><img class="im" src="{{__PUBLIC__}}/Home/images/hw (2).jpg" alt=""></a>
						<a href="index.php?m=Home&c=Content&a=index&gid=6&cid=1"><img class="im" src="{{__PUBLIC__}}/Home/images/hw (3).jpg" alt=""></a>
						<a href="index.php?m=Home&c=Content&a=index&gid=7&cid=13"><img class="im" src="{{__PUBLIC__}}/Home/images/hw (4).jpg" alt=""></a>
						<a href="index.php?m=Home&c=Content&a=index&gid=7&cid=13"><img class="im" src="{{__PUBLIC__}}/Home/images/hw (5).jpg" alt=""></a>
						<a href="index.php?m=Home&c=Content&a=index&gid=7&cid=13"><img class="im" src="{{__PUBLIC__}}/Home/images/hw (6).jpg" alt=""></a>
						<a href="index.php?m=Home&c=Content&a=index&gid=6&cid=1"><img class="im" src="{{__PUBLIC__}}/Home/images/hw (7).jpg" alt=""></a>
						<a href="index.php?m=Home&c=Content&a=index&gid=10&cid=1"><img class="im" src="{{__PUBLIC__}}/Home/images/hw (1).jpg" alt=""></a>
						<a href="index.php?m=Home&c=Content&a=index&gid=11&cid=3"><img class="im" src="{{__PUBLIC__}}/Home/images/hw (2).jpg" alt=""></a>
						<a href="index.php?m=Home&c=Content&a=index&gid=6&cid=1"><img class="im" src="{{__PUBLIC__}}/Home/images/hw (3).jpg" alt=""></a>
					</div>
					<ul class="point">
						<li style="background:#B61B1F;"></li>
						<li></li>
						<li></li>
						<li></li>
						<li></li>
						<li></li>
						<li></li>
					</ul>
					<input type="button" id="btn" class="cmbt" value="<">
					<input type="button" id="btn1" class="cmbt" value=">">
				</div>
			</div>
		</div>
			<!--间隔-->
			<div class="hr-20"></div>
			<!--热卖-->
		<div class="layout">
			<div class="lay-l">
				<ul>
					{{foreach from="$dataAll" value="$v"}}
					<li>
						<a href="{{U('Content/index',array('gid'=>$v['gid'],'cid'=>$v['category_cid']))}}"><img style="width:200px;height:252px;" src="{{__ROOT__}}/{{$v['list_view']}}" alt="" /></a>
						<div class="pro-info">
							<a href="{{U('Content/index',array('gid'=>$v['gid'],'cid'=>$v['category_cid']))}}" class="p-name"><?php echo mb_substr($v['gname'],0,10,'UTF-8') ?></a>
							<div class="info-1">
								<p class="p-info-1">精雕细琢的科技之美</p>
								<p class="p-info-2"></p>
							</div>
							<div class="p-price">
								<e>￥</e>
								<span>{{$v['shop_price']}}</span>
							</div>
							<div class="p-button">
								<a href="">立即抢购</a>
							</div>
						</div>
					</li>
					{{endforeach}}
					
				</ul>
			</div>
			<div class="lay-r">
				<div class="l-r-1">
					<a href="index.php?m=Home&c=Content&a=index&gid=15&cid=28"><img src="{{__PUBLIC__}}/Home/images/20151118211549311.jpg"/></a>
				</div>
				<div class="hr-21"></div>
				<div class="news">
					<ul class="news-bt">
						<li style="background:white;">热卖手机</li>
						<li style="background:#FCF7F7">热卖配件</li>
					</ul>
					<div class="detail-news">
						<ul class="g-news" style="display: block;">
							{{list from="$ones" name="$ov" row='6'}}
								<li><a href="{{U('Content/index',array('gid'=>$ov['gid'],'cid'=>$ov['category_cid']))}}">· <?php echo mb_substr($ov['gname'],0,26,'UTF-8') ?></a></li>
							{{endlist}}
						</ul>
						<ul class="g-news">
							{{list from="$twos" name="$tv" row='6'}}
								<li><a href="{{U('Content/index',array('gid'=>$tv['gid'],'cid'=>$tv['category_cid']))}}">· <?php echo mb_substr($tv['gname'],0,23,'UTF-8') ?></a></li>
							{{endlist}}
						</ul>
					</div>
				</div>
				<div class="hr-21"></div>
				<div class="l-r-3">
					<a href="{{U('User/users')}}"><img src="{{__PUBLIC__}}/Home/images/20151117102055458.jpg" alt="" /></a>
				</div>
			</div>
		</div>
		<div class="hr-20"></div>
		<!--广告-->		
		<div class="ad">
			<a href="index.php?m=Home&c=Content&a=index&gid=32&cid=49"><img src="{{__PUBLIC__}}/Home/images/20151215101916891.jpg" /></a>
		</div>
		<div class="hr-20"></div>
			<!--楼层1楼-->
		<div class="phone phone1">
			<div class="ph-bt">
				<h2><a href="javascript:;">{{$one['cname']}}</a></h2>
				<em>华为精品{{$one['cname']}}</em>
				<ul>
					{{foreach from="$cate[0]['son']" value="$vt"}}
						<li><a href="{{U('Lists/index',array('cid'=>$vt['cid']))}}">{{$vt['cname']}}</a></li>
					{{endforeach}}
				</ul>
			</div>
			<div class="ph-content">
				<ul>
					<li class="ph-hot">
						<a href="{{U('Content/index',array('gid'=>$one['gid'],'cid'=>$one['category_cid']))}}"><img style="width:222px;height:222px;" src="{{__ROOT__}}/{{$one['list_view']}}" alt="" /></a>
						<div class="pro-info">
							<a href="{{U('Content/index',array('gid'=>$one['gid'],'cid'=>$one['category_cid']))}}" class="p-name"><?php echo mb_substr($one['gname'],0,10,'UTF-8') ?></a>
							<div class="info-1">
								<p class="p-info-1">精雕细琢的科技之美</p>
								<p class="p-info-2"></p>
							</div>
							<div class="p-price">
								<e>￥</e>
								<span>{{$one['shop_price']}}</span>
							</div>
							<div class="p-button">
								<a href="">立即抢购</a>
							</div>
						</div>
					</li>
					{{foreach from="$ones" value="$v"}}
					<li class="ph-small">
						<a href="{{U('Content/index',array('gid'=>$v['gid'],'cid'=>$v['category_cid']))}}"><img style="width:222px;height:222px;" src="{{__ROOT__}}/{{$v['list_view']}}" alt="" /></a>
						<div class="info-1">
							<p class="p-info-1"><?php echo mb_substr($v['gname'],0,10,'UTF-8') ?></p>
						</div>
						<div class="p-price">
							<e>￥</e>
							<span>{{$v['shop_price']}}</span>
						</div>
					</li>
					{{endforeach}}
					
				</ul>
			</div>
		</div>
			<!--2楼-->
		<div class="hr-20"></div>
		<div class="hr-20"></div>
		<div class="phone phone2">
			<div class="ph-bt">
				<h2><a href="javascript:;">{{$two['cname']}}</a></h2>
				<em>华为精品{{$two['cname']}}</em>
				<ul>
					{{foreach from="$cate[1]['son']" value="$vt"}}
						<li><a href="{{U('Lists/index',array('cid'=>$vt['cid']))}}">{{$vt['cname']}}</a></li>
					{{endforeach}}
				</ul>
			</div>
			<div class="ph-content">
				<ul>
					{{foreach from="$twos" key="$k" value="$vw"}}
					{{if value="$k eq 0"}}
					<li class="ph-hot">
					{{else}}
					<li class="ph-small">
					{{endif}}
						<a href="{{U('Content/index',array('gid'=>$vw['gid'],'cid'=>$vw['category_cid']))}}"><img style="width:222px;height:222px;" src="{{__ROOT__}}/{{$vw['list_view']}}" alt="" /></a>
						<div class="pro-info">
							{{if value="$k eq 0"}}
							<a href="{{U('Content/index',array('gid'=>$vw['gid'],'cid'=>$vw['category_cid']))}}" class="p-name"><?php echo mb_substr($vw['gname'],0,10,'UTF-8') ?></a>
							<div class="info-1">
								<p class="p-info-1">精雕细琢的科技之美</p>
								<p class="p-info-2"></p>
							</div>
							{{else}}
							<div class="info-1">
								<p class="p-info-1"><?php echo mb_substr($vw['gname'],0,10,'UTF-8') ?></p>
							</div>
							{{endif}}
							<div class="p-price">
								<e>￥</e>
								<span>{{$vw['shop_price']}}</span>
							</div>
							{{if value="$k eq 0"}}
							<div class="p-button">
								<a href="">立即抢购</a>
							</div>
							{{endif}}
						</div>
					</li>
					{{endforeach}}
					
				</ul>
			</div>
		</div>
			<!--3楼-->
		<div class="hr-20"></div>
		<div class="phone phone3">
			<div class="ph-bt">
				<h2><a href="javascript:;">{{$three['cname']}}</a></h2>
				<em>华为精品{{$three['cname']}}</em>
				<ul>
					{{foreach from="$cate[2]['son']" value="$vt"}}
						<li><a href="{{U('Lists/index',array('cid'=>$vt['cid']))}}">{{$vt['cname']}}</a></li>
					{{endforeach}}
				</ul>
			</div>
			<div class="ph-content">
				<ul>
					{{foreach from="$threes" key="$k" value="$vth"}}
					{{if value="$k eq 0"}}
					<li class="ph-hot">
					{{else}}
					<li class="ph-small">
					{{endif}}
						<a href="{{U('Content/index',array('gid'=>$vth['gid'],'cid'=>$vth['category_cid']))}}"><img style="width:222px;height:222px;" src="{{__ROOT__}}/{{$vth['list_view']}}" alt="" /></a>
						<div class="pro-info">
							{{if value="$k eq 0"}}
							<a href="{{U('Content/index',array('gid'=>$vth['gid'],'cid'=>$vth['category_cid']))}}" class="p-name"><?php echo mb_substr($vth['gname'],0,10,'UTF-8') ?></a>
							<div class="info-1">
								<p class="p-info-1">精雕细琢的科技之美</p>
								<p class="p-info-2"></p>
							</div>
							{{else}}
							<div class="info-1">
								<p class="p-info-1"><?php echo mb_substr($vth['gname'],0,10,'UTF-8') ?></p>
							</div>
							{{endif}}
							<div class="p-price">
								<e>￥</e>
								<span>{{$vth['shop_price']}}</span>
							</div>
							{{if value="$k eq 0"}}
							<div class="p-button">
								<a href="">立即抢购</a>
							</div>
							{{endif}}
						</div>
					</li>
					{{endforeach}}
				</ul>
			</div>
		</div>
			<!--4楼-->
		<div class="hr-20"></div>
		<div class="phone phone4">
			<div class="ph-bt">
				<h2><a href="javascript:;">{{$four['cname']}}</a></h2>
				<em>华为精品{{$four['cname']}}</em>
				<ul>
					{{foreach from="$cate[3]['son']" value="$vt"}}
						<li><a href="{{U('Lists/index',array('cid'=>$vt['cid']))}}">{{$vt['cname']}}</a></li>
					{{endforeach}}
				</ul>
			</div>
			<div class="ph-content">
				<ul>
					{{foreach from="$fours" key="$k" value="$vf"}}
					{{if value="$k eq 0"}}
					<li class="ph-hot">
					{{else}}
					<li class="ph-small">
					{{endif}}
						<a href="{{U('Content/index',array('gid'=>$vf['gid'],'cid'=>$vf['category_cid']))}}"><img style="width:222px;height:222px;" src="{{__ROOT__}}/{{$vf['list_view']}}" alt="" /></a>
						<div class="pro-info">
							{{if value="$k eq 0"}}
							<a href="{{U('Content/index',array('gid'=>$vf['gid'],'cid'=>$vf['category_cid']))}}" class="p-name"><?php echo mb_substr($vf['gname'],0,10,'UTF-8') ?></a>
							<div class="info-1">
								<p class="p-info-1">精雕细琢的科技之美</p>
								<p class="p-info-2"></p>
							</div>
							{{else}}
							<div class="info-1">
								<p class="p-info-1"><?php echo mb_substr($vf['gname'],0,10,'UTF-8') ?></p>
							</div>
							{{endif}}
							<div class="p-price">
								<e>￥</e>
								<span>{{$vf['shop_price']}}</span>
							</div>
							{{if value="$k eq 0"}}
							<div class="p-button">
								<a href="">立即抢购</a>
							</div>
							{{endif}}
						</div>
					</li>
					{{endforeach}}
				</ul>
			</div>
		</div>
		
		<div class="hr-20"></div>	
			<!--广告-->		
		<div class="ad">
			<a href="index.php?m=Home&c=Content&a=index&gid=15&cid=28"> <img src="{{__PUBLIC__}}/Home/images/20151130143459877.jpg" /></a>
		</div>
		<div class="hr-20"></div>
		<div class="hr-20"></div>
		<div class="contact">
			
		</div>

			<!--底部-->
		{{include file="VIEW_PATH/Common/footer.php"}}
		
	</body>
</html>
